﻿@using Blazor.Diagrams.Components
@using AntDesign
@using AntDesign.Core;
@using AntDesign.TableModels;
@using ERP.Workflow.Designer.BlazorUI.Components;
@using Microsoft.Extensions.Localization
 @page "/workflow/designer/{id}"
 @implements  ERP.Abp.AntDesignUI.IReuseTabsPage
 
 
<div  @ondrop="Drop"  ondragover="event.preventDefault();" @ondragover:preventDefault  style="width:100%; height: 100vh; user-select: none !important;overflow:scroll;">
    @if (_diagram is not null)
    {
        <CascadingValue Value="_diagram"  >
            <CascadingValue Value="Definition">
              <DiagramCanvas  Class="grid"   >
                    <Widgets>
          @*               <div style="width:300px; z-index:1000;position:absolute; right:0px;bottom:10px">
                             
           <NavigatorWidget Width="300" Height="200" ></NavigatorWidget></div>
 *@
  <PropertyBox @ref="_property" OnChange="PropertyBox_Change"  Style="width:240px; z-index:1000; position:absolute; right:0px;top:50px;background:white;" ></PropertyBox>
                        
                            <MenuBox
                                
                                OnClickTitle="_menuBox_OnClickTitle"
                                  OnSave="DiagramPanel_OnSave"
                                    OnRefresh="DiagramPanel_OnRefresh"
                                    OnNew="DiagramPanel_OnNew"
                                
                            Style="z-index:1000;position:absolute;left:0px;right:0px"></MenuBox>
                          
                             <ToolBox  
                                  @ref="_toolBox"
                                   OnDragStart="    (arg) => { CurrentTool = arg.Data;  }" 
                                 Style=" z-index:1000; width:150px; top:50px;  position:absolute;left:0px;right:0px"></ToolBox>
                          
                    </Widgets>
                </DiagramCanvas>
   
       </CascadingValue>
  </CascadingValue>
  }
</div>
 


 

 @code{
       public RenderFragment GetPageTitle()
        {
            return
    @<span><AntDesign.Icon Type = "highlight" />@L["WorkflowDesign"]</span >;
        }

 }

 <style scoped>
     html,body{ overflow:hidden; }
 </style>
 